<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="~{page/head :: head}"></head>

<body class="hold-transition skin-blue sidebar-mini">

<div class="wrapper">
    <!--顶部导航栏-->
    <header th:insert="~{page/top_nav::top_nav}"></header>
    <!--左导航-->
    <aside th:insert="~{page/left_nav::left_nav}"></aside>
    <!-- Content Wrapper. Contains page content -->

    <div th:switch="${prometheus_url !='error'}" class="content-wrapper">
        <section th:insert="~{page/dash::section_info('prometheus')}"></section>
        <div th:case="true">
            <iframe id="mainiframe" th:src="${prometheus_url}" height="600" width="100%"
                    frameborder="0" scrolling="auto" seamless="seamless"
            ></iframe>
        </div>
        <div th:case="false">
            <h2>您还未配置prometheus监控页面</h2>
        </div>
    </div>
</div>
</body>
<div th:include="~{page/js_content :: jsContent}"></div>
<script>
    function changeFrameHeight(){
        var ifm= document.getElementById("mainiframe");
        ifm.height=document.documentElement.clientHeight-56;
    }
    window.onresize=function(){ changeFrameHeight();}
    $(function(){changeFrameHeight();});
</script>
</html>